package com.uex.dev.manage.admin.vo.device;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.uex.dev.manage.admin.po.ModelRobotPO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.beans.BeanUtils;

/**
 * @author lzs
 * @create 2024/03/06
 * @description
 */
@Schema(description = "收单机能力信息")
@Data
@JsonIgnoreProperties(value = {"deviceToken"}, allowSetters = true)
public class RobotInfo {
    @Schema(description = "设备Id")
    private Integer deviceId;
    @TableId(value = "model_id", type = IdType.AUTO)
    private Integer modelId;
    @Schema(description = "设备唯一标识")
    private String deviceToken;
    @Schema(description = "设备型号")
    private String deviceModel;
    @Schema(description = "归档箱数量")
    private Integer devicePackNum;
    @Schema(description = "归档箱最大容量")
    private Integer devicePackPage;
    @Schema(description = "暂存格数量")
    private Integer deviceTempNum;
    @Schema(description = "退件箱数量")
    private Integer deviceBackNum;
    @Schema(description = "钉子数量")
    private Integer deviceNailNum;
    @Schema(description = "是否有打印机")
    private Boolean devicePrinter;
    @Schema(description = "是否有扫描仪")
    private Boolean deviceScanner;
    @Schema(description = "是否有扫码")
    private Boolean deviceQrscanner;
    @Schema(description = "是否有广告屏")
    private Boolean deviceAdsShow;
    @Schema(description = "是否支持抵扣联投递")
    private Boolean deviceDeduction;
    @Schema(description = "是否支持打印不干胶")
    private Boolean devicePrintLabel;
    @Schema(description = "屏幕尺寸")
    private String deviceScreenSize;

    public RobotInfo fromPO(ModelRobotPO modelRobotPO) {
        RobotInfo robotInfo = new RobotInfo();
        BeanUtils.copyProperties(modelRobotPO, robotInfo);
        return robotInfo;
    }

    public ModelRobotPO toModelRobotPO() {
        ModelRobotPO modelRobot = new ModelRobotPO();
        BeanUtils.copyProperties(this, modelRobot);
        return modelRobot;
    }
}

